package homework;
class Student {
    // 创建类
    private String Name;
    private String ID;
    private String Class;
    private String Gender;
    private int Age;
    private String Personality;
    // 构造函数
    public Student(String n, String id, String cls, String g, int a, String ps) {
        this.Name = n;
        this.ID = id;
        this.Class = cls;
        this.Gender = g;
        this.Age = a;
        this.Personality = ps;
    }
    // 获取各项信息的方法
    public String getName() {
        return Name;
    }
    public String getID() {
        return ID;
    }
    public String getClassName() {
        return Class;
    }
    public String getGender() {
        return Gender;
    }
    public int getAge() {
        return Age;
    }
    public String getPersonality() {
        return Personality;
    }
    // 获取信息概要的方法
    public String getInfo() {
        return "My name is " + Name + ". My ID is " + ID + ". My class is " + Class + ". My gender is " + Gender + ". My age is " + Age + ". My personality is " + Personality + ".";
    }
}
public class xs {
    public static void main(String[] args) {
        Student stu1 = new Student("Monika", "1001", "DokiDokiLiteratureClub", "Female", 16, "curious");
        Student stu2 = new Student("Anon", "1002", "Mygo", "Female", 15, "stupid");
        Student stu3 = new Student("Saki", "1003", "Crychic", "Female", 16, "sad");
        // 输出信息概要
        System.out.println(stu1.getInfo());
        System.out.println(stu2.getInfo());
        System.out.println(stu3.getInfo());
    }
}
